package com.iemes.controller.warehouse;

import java.util.List;
import java.util.Map;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.iemes.annotation.SystemLog;
import com.iemes.controller.index.BaseController;
import com.iemes.entity.EnterstorageFormMap;
import com.iemes.mapper.warehouse.EnterstorageMapper;
import com.iemes.plugin.PageView;
import com.iemes.util.Common;
import com.iemes.util.MyDateUtils;

@RequestMapping("/enterstorage_notice/")
@Controller
public class Enterstorage_NoticeController extends BaseController {

	@Inject
	private EnterstorageMapper enterstorageMapper;

	// 查看产品放货通知单，显示按钮。
	@RequestMapping("enterstorage_notice")
	public String enterstorage_notice(Model model) {
		model.addAttribute("res", findByRes());
		return Common.BACKGROUND_PATH + "/warehouse/enterstorage_notice_list";
	}

	// 产品放货通知单分页
	@ResponseBody
	@RequestMapping("enterstorage_notice_findByPage")
	public PageView findByPage(String pageNow, String pageSize) throws Exception {
		EnterstorageFormMap enterstorageFormMap = getFormMap(EnterstorageFormMap.class);
		List<Map<String, Object>> enter = enterstorageMapper.getAll(enterstorageFormMap);
		LuogicPaging(pageNow, pageSize, enter);
		return pageView;
	}
}